<?php
/**
 * @var $models array of Article
 * @var $model Article
 */
?>
<?php if(count($models)) :?>
    <?php $i=1; foreach ($models as $model) : $detailUrl = Yii::app()->createUrl('/Article/default/view',array('cat_id'=>$model->category_id,'locale'=>$model->localeArticle->locale,'id'=>$model->localeArticle->article_id,'alias'=>$model->localeArticle->alias)); ?>
        <div class="span-2">
            <h1 class="title blue"><a href="<?php echo $detailUrl; ?>"><?php echo $model->localeArticle->title; ?></a></h1>
            <p>
                <?php echo firstWordsExt(strip_tags($model->localeArticle->content),$this->contentLimited);?>
            </p>
            <a href="<?php echo $detailUrl; ?>" class="readmore"><?php echo Yii::t('site/general','Read more')?></a>
        </div>
        <?php endforeach;?>
    <?php else : ?>
    <?php echo $this->emptyText;?>
    <?php endif;?>
